package com.xuan.factory.simple;

public class SimpleFactory {
    public Device createDevice(String type) {
        if ("computer".equals(type)) {
            return new Computer();
        } else if ("phone".equals(type)) {
            return new Phone();
        }
        return null;
    }
}
